package it.intecs.pisa.smarcos.base;

import it.intecs.pisa.smarcos.R;
import it.intecs.pisa.smarcos.R.string;
import android.content.Context;
import android.util.Log;


public final class ConfigurationManager {

	private static final String TAG = ConfigurationManager.class.getSimpleName();
	private static ConfigurationManager instance;
	Context context;

	private String vibration; // NONE, LEVEL1, LEVEL2 
	private String selectionType; // TOUCH, DOUBLE_TOUCH
	

	public static ConfigurationManager getInstance(Context con){
		Log.d(TAG, "getInstance");

		if(instance==null)
			instance=new ConfigurationManager(con);

		return instance;
	}

	public static void nullInstance(){
		instance = null;
	}

	private ConfigurationManager(Context con) {

		this.context = con;  
		vibration = context.getString(R.string.TTS_Level1);
		selectionType = context.getString(R.string.TTS_Config_SelectionType_DoubleTouch);
	}

	public String getVibration() {
		return vibration;
	}
	
	public void setVibration(String vibr) {
		vibration = vibr;
	}
	
	public String getSelectionType() {
		return selectionType;
	}
	
	public void setSelectionType(String sel) {
		selectionType = sel;
	}
}
